#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
    int n;
    bool flag = false;
    cin >> n;
    for(int i=20;i>=0;i--){
        if(n&(1<<i)){
            if(flag) cout << " ";
            cout << i+1;
            flag = true;
        }
    }
    cout << endl;
    return 0;
}
